#ifndef MAINPAGE_H
#define MAINPAGE_H

#include <QWidget>
#include <QSlider>
#include <QProgressBar>
#include <QHBoxLayout>
#include <QGroupBox>
#include "src/Control/CustomSliderNum.h"
#include "src/Util/def.h"
#include "src/Control/CustomSliderNum.h"
#include "src/Util/def.h"
namespace Ui {
class MainPage;
}

class WaterProgressBar;

class MainPage : public QWidget
{
    Q_OBJECT

public:
    explicit MainPage(QWidget *parent = nullptr);
    ~MainPage();

private slots:
    void on_btnLogin_clicked();
  void  LoginFeedBackSlot(bool re);
  void updateMyDeviceNameSlot(const QJsonArray &arr);
  void showDodayMessageSlot(const QJsonArray &arr);
  void realTimeMessageSlot(const QJsonObject &obj);



  void controlNormalDeviceSlot();

  void on_btnTodayMessage_clicked();

  void on_cbIndexName_currentIndexChanged(const QString &arg1);

  void on_btnBack_clicked();



  void on_btnShowAllMessage_clicked();

  void on_btnwater1_clicked();

  void on_btnwater2_clicked();

protected:
  void paintEvent(QPaintEvent *event);
  WaterProgressBar *tem1;
  WaterProgressBar *hum1;
  //WaterProgressBar *tem2;
 // WaterProgressBar *hum2;
  CustomSliderNum  *slidernumpress;
  CustomSliderNum  *slidernumhum2;
  CustomSliderNum  *slidernumlight;
  bool water1flag=false;
  bool water2flag=false;

 // CustomSliderNum  *slidernumPm2_5;


private:
    Ui::MainPage *ui;
};

#endif // MAINPAGE_H
